package com.lonty.intelligence.mapper;

import com.lonty.intelligence.model.Dynamic;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author 陈璇
 * @Date 2020/6/9 14:20
 * @Version 1.0
 */
@Mapper
public interface DynamicMapper {

    /**
     * 添加动态
     * @param dynamic
     * @return
     */
    int saveDynamic(Dynamic dynamic);

    /**
     * 根据类型获取动态
     * @param type
     * @return
     */
    List<Dynamic> getDynamic(Integer type);

    /**
     * 根据ID获取动态
     * @param id
     * @return
     */
    Dynamic getById(String id);

    /**
     * 删除动态
     * @param id
     * @return
     */
    int deleteDynamic(String id);

}
